
<div class="list">
  <table>
    <thead>
      <tr>              
        <g:sortableColumn property="id" title="Id" />
        <g:sortableColumn property="startDate" title="Start Date" />
        <g:sortableColumn property="endDate" title="End Date" />
        <g:sortableColumn property="duration" title="Duration" />
        <g:sortableColumn property="description" title="Description" />
      </tr>
    </thead>
    <tbody>
      <g:each in="${vacationInstanceList}" status="i" var="vacationInstance">
        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">                
          <td><g:link controller="vacation" action="show" id="${vacationInstance.id}">${fieldValue(bean:vacationInstance, field:'id')}</g:link></td>
          <td>${g.format(date:vacationInstance.startDate)}</td>
          <td>${g.format(date:vacationInstance.endDate)}</td>
	  <td>${vacationInstance.endDate - vacationInstance.startDate + 1 }</td>
          <td>${fieldValue(bean:vacationInstance, field:'description')}</td>
        </tr>
      </g:each>
    </tbody>
  </table>
</div>
